﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Wijmo/Views/Shared/ViewMasterPage1.Master"
    Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Calender
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="calendar">
    </div>
    <label for="popdate">
        Choose a Date:</label>
    <input name="popdate" type="text" id="popdate" style="width: 180px;" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderCss" runat="server">
    <link href="<%=Html.AreaCssPath("Wijmo") %>themes/wijmo/jquery.ui.wijcalendar.css"
        rel="stylesheet" type="text/css" />
    <%--<link href="<%=Html.AreaCssPath("Wijmo") %>base-reset.css" rel="stylesheet" type="text/css" />--%>
    <style type="text/css">
        body
        {
            font-size: 12px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolderScript" runat="server">
    <script src="<%=Html.AreaContentPath("Wijmo") %>js/jquery.glob.min.js" type="text/javascript"></script>
    <script src="<%=Html.AreaContentPath("Wijmo") %>js/globinfo/jquery.glob.all.min.js"
        type="text/javascript"></script>
    <script src="<%=Html.AreaContentPath("Wijmo") %>js/wijmo/jquery.ui.wijpopup.js" type="text/javascript"></script>
    <script src="<%=Html.AreaContentPath("Wijmo") %>js/wijmo/jquery.ui.wijcalendar.js"
        type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#calendar").wijcalendar(
		{
		    popupMode: true,
		    culture: "vi-VN",
		    selectedDatesChanged: function () {
		        var selDate = $(this).wijcalendar("getSelectedDate");
		        if (!!selDate) $("#popdate").val(selDate.toDateString());
		        selDates = $("#calendar").wijcalendar('option', 'selectedDates');
		        $.each(selDates, function (i, d) {
		            $("#popdate").val(d.getFullYear() + "/" + d.getMonth() + "/" + d.getDate());
		        });

		    }
		});

            $("#popdate").click(function () {
                $("#calendar").wijcalendar("popup", {
                    of: $("#popdate"),
                    culture: "vi-VN",
                    offset: '0 2'
                });
            })
        });
	
    </script>
</asp:Content>
